package com.ie.mapper.admin;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ie.entity.FocusEntity;
import com.ie.entity.GoodsEntity;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author hp
 */
@Repository
public interface GoodsMapper extends BaseMapper<GoodsEntity> {
    IPage<GoodsEntity> iPageGoods(IPage<GoodsEntity> page , @Param(Constants.WRAPPER) LambdaQueryWrapper<GoodsEntity> wrapper);

    @MapKey("id")
    List<Map<String,Object>> myCartGoods(int uid);

    IPage<GoodsEntity> iPageMyFocusGoods(IPage<GoodsEntity> page , @Param(Constants.WRAPPER) LambdaQueryWrapper<FocusEntity> wrapper);
}

